3.3.48 \(\int \frac {\cot ^4(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\) [248]

Optimal. Leaf size=240 \[ \frac {x}{(a-b)^3}-\frac {b^{5/2} \left (63 a^2-90 a b+35 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{9/2} (a-b)^3 f}+\frac {\left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) \cot (e+f x)}{8 a^4 (a-b)^2 f}-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 (a-b)^2 f}-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )} \]

[Out]

x/(a-b)^3-1/8*b^(5/2)*(63*a^2-90*a*b+35*b^2)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))/a^(9/2)/(a-b)^3/f+1/8*(8*a^3+8
*a^2*b-55*a*b^2+35*b^3)*cot(f*x+e)/a^4/(a-b)^2/f-1/24*(8*a^2-55*a*b+35*b^2)*cot(f*x+e)^3/a^3/(a-b)^2/f-1/4*b*c
ot(f*x+e)^3/a/(a-b)/f/(a+b*tan(f*x+e)^2)^2-1/8*(11*a-7*b)*b*cot(f*x+e)^3/a^2/(a-b)^2/f/(a+b*tan(f*x+e)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.25, antiderivative size = 240, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3751, 483, 593, 597, 536, 209, 211} \begin {gather*} -\frac {b (11 a-7 b) \cot ^3(e+f x)}{8 a^2 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac {b^{5/2} \left (63 a^2-90 a b+35 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{9/2} f (a-b)^3}-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 f (a-b)^2}+\frac {\left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) \cot (e+f x)}{8 a^4 f (a-b)^2}-\frac {b \cot ^3(e+f x)}{4 a f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}+\frac {x}{(a-b)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

x/(a - b)^3 - (b^(5/2)*(63*a^2 - 90*a*b + 35*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(8*a^(9/2)*(a - b)^3
*f) + ((8*a^3 + 8*a^2*b - 55*a*b^2 + 35*b^3)*Cot[e + f*x])/(8*a^4*(a - b)^2*f) - ((8*a^2 - 55*a*b + 35*b^2)*Co
t[e + f*x]^3)/(24*a^3*(a - b)^2*f) - (b*Cot[e + f*x]^3)/(4*a*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((11*a - 7*
b)*b*Cot[e + f*x]^3)/(8*a^2*(a - b)^2*f*(a + b*Tan[e + f*x]^2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 483

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*(e*
x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*e*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a*d)
*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n
*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ
[p, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 593

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*g*n*(b*c - a*d)*(p +
 1))), x] + Dist[1/(a*n*(b*c - a*d)*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f)
*(m + 1) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, e, f, g, m, q}, x] && IGtQ[n, 0] && LtQ[p, -1]

Rule 597

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*c*g*(m + 1))), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {\text {Subst}\left (\int \frac {4 a-7 b-7 b x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a (a-b) f}\\ &=-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2-55 a b+35 b^2-5 (11 a-7 b) b x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 (a-b)^2 f}\\ &=-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 (a-b)^2 f}-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {3 \left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right )+3 b \left (8 a^2-55 a b+35 b^2\right ) x^2}{x^2 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{24 a^3 (a-b)^2 f}\\ &=\frac {\left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) \cot (e+f x)}{8 a^4 (a-b)^2 f}-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 (a-b)^2 f}-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {3 \left (8 a^4+8 a^3 b+8 a^2 b^2-55 a b^3+35 b^4\right )+3 b \left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{24 a^4 (a-b)^2 f}\\ &=\frac {\left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) \cot (e+f x)}{8 a^4 (a-b)^2 f}-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 (a-b)^2 f}-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^3 f}-\frac {\left (b^3 \left (63 a^2-90 a b+35 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^4 (a-b)^3 f}\\ &=\frac {x}{(a-b)^3}-\frac {b^{5/2} \left (63 a^2-90 a b+35 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{8 a^{9/2} (a-b)^3 f}+\frac {\left (8 a^3+8 a^2 b-55 a b^2+35 b^3\right ) \cot (e+f x)}{8 a^4 (a-b)^2 f}-\frac {\left (8 a^2-55 a b+35 b^2\right ) \cot ^3(e+f x)}{24 a^3 (a-b)^2 f}-\frac {b \cot ^3(e+f x)}{4 a (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac {(11 a-7 b) b \cot ^3(e+f x)}{8 a^2 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 3.32, size = 184, normalized size = 0.77 \begin {gather*} \frac {-\frac {3 b^{5/2} \left (63 a^2-90 a b+35 b^2\right ) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{9/2} (a-b)^3}-\frac {8 \cot (e+f x) \left (-4 a-9 b+a \csc ^2(e+f x)\right )}{a^4}+\frac {3 \left (8 (e+f x)-\frac {(a-b) b^3 \left (17 a^2+2 a b-11 b^2+\left (17 a^2-28 a b+11 b^2\right ) \cos (2 (e+f x))\right ) \sin (2 (e+f x))}{a^4 (a+b+(a-b) \cos (2 (e+f x)))^2}\right )}{(a-b)^3}}{24 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

((-3*b^(5/2)*(63*a^2 - 90*a*b + 35*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(a^(9/2)*(a - b)^3) - (8*Cot[e
 + f*x]*(-4*a - 9*b + a*Csc[e + f*x]^2))/a^4 + (3*(8*(e + f*x) - ((a - b)*b^3*(17*a^2 + 2*a*b - 11*b^2 + (17*a
^2 - 28*a*b + 11*b^2)*Cos[2*(e + f*x)])*Sin[2*(e + f*x)])/(a^4*(a + b + (a - b)*Cos[2*(e + f*x)])^2)))/(a - b)
^3)/(24*f)

________________________________________________________________________________________

Maple [A]
time = 0.54, size = 173, normalized size = 0.72

method result size
derivativedivides \(\frac {-\frac {b^{3} \left (\frac {\left (\frac {15}{8} a^{2} b -\frac {13}{4} a \,b^{2}+\frac {11}{8} b^{3}\right ) \left (\tan ^{3}\left (f x +e \right )\right )+\frac {a \left (17 a^{2}-30 a b +13 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (63 a^{2}-90 a b +35 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{4} \left (a -b \right )^{3}}-\frac {1}{3 a^{3} \tan \left (f x +e \right )^{3}}-\frac {-a -3 b}{a^{4} \tan \left (f x +e \right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{3}}}{f}\) \(173\)
default \(\frac {-\frac {b^{3} \left (\frac {\left (\frac {15}{8} a^{2} b -\frac {13}{4} a \,b^{2}+\frac {11}{8} b^{3}\right ) \left (\tan ^{3}\left (f x +e \right )\right )+\frac {a \left (17 a^{2}-30 a b +13 b^{2}\right ) \tan \left (f x +e \right )}{8}}{\left (a +b \left (\tan ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {\left (63 a^{2}-90 a b +35 b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{8 \sqrt {a b}}\right )}{a^{4} \left (a -b \right )^{3}}-\frac {1}{3 a^{3} \tan \left (f x +e \right )^{3}}-\frac {-a -3 b}{a^{4} \tan \left (f x +e \right )}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{3}}}{f}\) \(173\)
risch \(\text {Expression too large to display}\) \(1124\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(-b^3/a^4/(a-b)^3*(((15/8*a^2*b-13/4*a*b^2+11/8*b^3)*tan(f*x+e)^3+1/8*a*(17*a^2-30*a*b+13*b^2)*tan(f*x+e))
/(a+b*tan(f*x+e)^2)^2+1/8*(63*a^2-90*a*b+35*b^2)/(a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2)))-1/3/a^3/tan(f*x
+e)^3-(-a-3*b)/a^4/tan(f*x+e)+1/(a-b)^3*arctan(tan(f*x+e)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 340, normalized size = 1.42 \begin {gather*} -\frac {\frac {3 \, {\left (63 \, a^{2} b^{3} - 90 \, a b^{4} + 35 \, b^{5}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} \sqrt {a b}} - \frac {3 \, {\left (8 \, a^{3} b^{2} + 8 \, a^{2} b^{3} - 55 \, a b^{4} + 35 \, b^{5}\right )} \tan \left (f x + e\right )^{6} - 8 \, a^{5} + 16 \, a^{4} b - 8 \, a^{3} b^{2} + {\left (48 \, a^{4} b + 40 \, a^{3} b^{2} - 275 \, a^{2} b^{3} + 175 \, a b^{4}\right )} \tan \left (f x + e\right )^{4} + 8 \, {\left (3 \, a^{5} + a^{4} b - 11 \, a^{3} b^{2} + 7 \, a^{2} b^{3}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{6} b^{2} - 2 \, a^{5} b^{3} + a^{4} b^{4}\right )} \tan \left (f x + e\right )^{7} + 2 \, {\left (a^{7} b - 2 \, a^{6} b^{2} + a^{5} b^{3}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{8} - 2 \, a^{7} b + a^{6} b^{2}\right )} \tan \left (f x + e\right )^{3}} - \frac {24 \, {\left (f x + e\right )}}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

-1/24*(3*(63*a^2*b^3 - 90*a*b^4 + 35*b^5)*arctan(b*tan(f*x + e)/sqrt(a*b))/((a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b
^3)*sqrt(a*b)) - (3*(8*a^3*b^2 + 8*a^2*b^3 - 55*a*b^4 + 35*b^5)*tan(f*x + e)^6 - 8*a^5 + 16*a^4*b - 8*a^3*b^2
+ (48*a^4*b + 40*a^3*b^2 - 275*a^2*b^3 + 175*a*b^4)*tan(f*x + e)^4 + 8*(3*a^5 + a^4*b - 11*a^3*b^2 + 7*a^2*b^3
)*tan(f*x + e)^2)/((a^6*b^2 - 2*a^5*b^3 + a^4*b^4)*tan(f*x + e)^7 + 2*(a^7*b - 2*a^6*b^2 + a^5*b^3)*tan(f*x +
e)^5 + (a^8 - 2*a^7*b + a^6*b^2)*tan(f*x + e)^3) - 24*(f*x + e)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3))/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 487 vs. \(2 (229) = 458\).
time = 2.96, size = 1038, normalized size = 4.32 \begin {gather*} \left [\frac {96 \, a^{4} b^{2} f x \tan \left (f x + e\right )^{7} + 192 \, a^{5} b f x \tan \left (f x + e\right )^{5} + 96 \, a^{6} f x \tan \left (f x + e\right )^{3} + 12 \, {\left (8 \, a^{4} b^{2} - 63 \, a^{2} b^{4} + 90 \, a b^{5} - 35 \, b^{6}\right )} \tan \left (f x + e\right )^{6} - 32 \, a^{6} + 96 \, a^{5} b - 96 \, a^{4} b^{2} + 32 \, a^{3} b^{3} + 4 \, {\left (48 \, a^{5} b - 8 \, a^{4} b^{2} - 315 \, a^{3} b^{3} + 450 \, a^{2} b^{4} - 175 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + 32 \, {\left (3 \, a^{6} - 2 \, a^{5} b - 12 \, a^{4} b^{2} + 18 \, a^{3} b^{3} - 7 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (63 \, a^{2} b^{4} - 90 \, a b^{5} + 35 \, b^{6}\right )} \tan \left (f x + e\right )^{7} + 2 \, {\left (63 \, a^{3} b^{3} - 90 \, a^{2} b^{4} + 35 \, a b^{5}\right )} \tan \left (f x + e\right )^{5} + {\left (63 \, a^{4} b^{2} - 90 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left (a b \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right )}{96 \, {\left ({\left (a^{7} b^{2} - 3 \, a^{6} b^{3} + 3 \, a^{5} b^{4} - a^{4} b^{5}\right )} f \tan \left (f x + e\right )^{7} + 2 \, {\left (a^{8} b - 3 \, a^{7} b^{2} + 3 \, a^{6} b^{3} - a^{5} b^{4}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} f \tan \left (f x + e\right )^{3}\right )}}, \frac {48 \, a^{4} b^{2} f x \tan \left (f x + e\right )^{7} + 96 \, a^{5} b f x \tan \left (f x + e\right )^{5} + 48 \, a^{6} f x \tan \left (f x + e\right )^{3} + 6 \, {\left (8 \, a^{4} b^{2} - 63 \, a^{2} b^{4} + 90 \, a b^{5} - 35 \, b^{6}\right )} \tan \left (f x + e\right )^{6} - 16 \, a^{6} + 48 \, a^{5} b - 48 \, a^{4} b^{2} + 16 \, a^{3} b^{3} + 2 \, {\left (48 \, a^{5} b - 8 \, a^{4} b^{2} - 315 \, a^{3} b^{3} + 450 \, a^{2} b^{4} - 175 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + 16 \, {\left (3 \, a^{6} - 2 \, a^{5} b - 12 \, a^{4} b^{2} + 18 \, a^{3} b^{3} - 7 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (63 \, a^{2} b^{4} - 90 \, a b^{5} + 35 \, b^{6}\right )} \tan \left (f x + e\right )^{7} + 2 \, {\left (63 \, a^{3} b^{3} - 90 \, a^{2} b^{4} + 35 \, a b^{5}\right )} \tan \left (f x + e\right )^{5} + {\left (63 \, a^{4} b^{2} - 90 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {b}{a}}}{2 \, b \tan \left (f x + e\right )}\right )}{48 \, {\left ({\left (a^{7} b^{2} - 3 \, a^{6} b^{3} + 3 \, a^{5} b^{4} - a^{4} b^{5}\right )} f \tan \left (f x + e\right )^{7} + 2 \, {\left (a^{8} b - 3 \, a^{7} b^{2} + 3 \, a^{6} b^{3} - a^{5} b^{4}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} f \tan \left (f x + e\right )^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[1/96*(96*a^4*b^2*f*x*tan(f*x + e)^7 + 192*a^5*b*f*x*tan(f*x + e)^5 + 96*a^6*f*x*tan(f*x + e)^3 + 12*(8*a^4*b^
2 - 63*a^2*b^4 + 90*a*b^5 - 35*b^6)*tan(f*x + e)^6 - 32*a^6 + 96*a^5*b - 96*a^4*b^2 + 32*a^3*b^3 + 4*(48*a^5*b
 - 8*a^4*b^2 - 315*a^3*b^3 + 450*a^2*b^4 - 175*a*b^5)*tan(f*x + e)^4 + 32*(3*a^6 - 2*a^5*b - 12*a^4*b^2 + 18*a
^3*b^3 - 7*a^2*b^4)*tan(f*x + e)^2 - 3*((63*a^2*b^4 - 90*a*b^5 + 35*b^6)*tan(f*x + e)^7 + 2*(63*a^3*b^3 - 90*a
^2*b^4 + 35*a*b^5)*tan(f*x + e)^5 + (63*a^4*b^2 - 90*a^3*b^3 + 35*a^2*b^4)*tan(f*x + e)^3)*sqrt(-b/a)*log((b^2
*tan(f*x + e)^4 - 6*a*b*tan(f*x + e)^2 + a^2 + 4*(a*b*tan(f*x + e)^3 - a^2*tan(f*x + e))*sqrt(-b/a))/(b^2*tan(
f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)))/((a^7*b^2 - 3*a^6*b^3 + 3*a^5*b^4 - a^4*b^5)*f*tan(f*x + e)^7 + 2*(
a^8*b - 3*a^7*b^2 + 3*a^6*b^3 - a^5*b^4)*f*tan(f*x + e)^5 + (a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^3)*f*tan(f*x +
e)^3), 1/48*(48*a^4*b^2*f*x*tan(f*x + e)^7 + 96*a^5*b*f*x*tan(f*x + e)^5 + 48*a^6*f*x*tan(f*x + e)^3 + 6*(8*a^
4*b^2 - 63*a^2*b^4 + 90*a*b^5 - 35*b^6)*tan(f*x + e)^6 - 16*a^6 + 48*a^5*b - 48*a^4*b^2 + 16*a^3*b^3 + 2*(48*a
^5*b - 8*a^4*b^2 - 315*a^3*b^3 + 450*a^2*b^4 - 175*a*b^5)*tan(f*x + e)^4 + 16*(3*a^6 - 2*a^5*b - 12*a^4*b^2 +
18*a^3*b^3 - 7*a^2*b^4)*tan(f*x + e)^2 - 3*((63*a^2*b^4 - 90*a*b^5 + 35*b^6)*tan(f*x + e)^7 + 2*(63*a^3*b^3 -
90*a^2*b^4 + 35*a*b^5)*tan(f*x + e)^5 + (63*a^4*b^2 - 90*a^3*b^3 + 35*a^2*b^4)*tan(f*x + e)^3)*sqrt(b/a)*arcta
n(1/2*(b*tan(f*x + e)^2 - a)*sqrt(b/a)/(b*tan(f*x + e))))/((a^7*b^2 - 3*a^6*b^3 + 3*a^5*b^4 - a^4*b^5)*f*tan(f
*x + e)^7 + 2*(a^8*b - 3*a^7*b^2 + 3*a^6*b^3 - a^5*b^4)*f*tan(f*x + e)^5 + (a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^
3)*f*tan(f*x + e)^3)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**4/(a+b*tan(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 1.26, size = 261, normalized size = 1.09 \begin {gather*} -\frac {\frac {3 \, {\left (63 \, a^{2} b^{3} - 90 \, a b^{4} + 35 \, b^{5}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}\right )} \sqrt {a b}} - \frac {24 \, {\left (f x + e\right )}}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} + \frac {3 \, {\left (15 \, a b^{4} \tan \left (f x + e\right )^{3} - 11 \, b^{5} \tan \left (f x + e\right )^{3} + 17 \, a^{2} b^{3} \tan \left (f x + e\right ) - 13 \, a b^{4} \tan \left (f x + e\right )\right )}}{{\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{2}} - \frac {8 \, {\left (3 \, a \tan \left (f x + e\right )^{2} + 9 \, b \tan \left (f x + e\right )^{2} - a\right )}}{a^{4} \tan \left (f x + e\right )^{3}}}{24 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/24*(3*(63*a^2*b^3 - 90*a*b^4 + 35*b^5)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*
b)))/((a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*sqrt(a*b)) - 24*(f*x + e)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) + 3*(15*
a*b^4*tan(f*x + e)^3 - 11*b^5*tan(f*x + e)^3 + 17*a^2*b^3*tan(f*x + e) - 13*a*b^4*tan(f*x + e))/((a^6 - 2*a^5*
b + a^4*b^2)*(b*tan(f*x + e)^2 + a)^2) - 8*(3*a*tan(f*x + e)^2 + 9*b*tan(f*x + e)^2 - a)/(a^4*tan(f*x + e)^3))
/f

________________________________________________________________________________________

Mupad [B]
time = 15.36, size = 986, normalized size = 4.11 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {262144\,a^{33}\,b^2-2883584\,a^{32}\,b^3+14155776\,a^{31}\,b^4-40370176\,a^{30}\,b^5+72089600\,a^{29}\,b^6-77856768\,a^{28}\,b^7+34603008\,a^{27}\,b^8+34603008\,a^{26}\,b^9-77856768\,a^{25}\,b^{10}+72089600\,a^{24}\,b^{11}-40370176\,a^{23}\,b^{12}+14155776\,a^{22}\,b^{13}-2883584\,a^{21}\,b^{14}+262144\,a^{20}\,b^{15}}{{\left (2\,a^3-6\,a^2\,b+6\,a\,b^2-2\,b^3\right )}^2}-1254400\,a^{12}\,b^{17}+13977600\,a^{13}\,b^{16}-70333440\,a^{14}\,b^{15}+210329600\,a^{15}\,b^{14}-413730816\,a^{16}\,b^{13}+559067136\,a^{17}\,b^{12}-525322240\,a^{18}\,b^{11}+338780160\,a^{19}\,b^{10}-143512576\,a^{20}\,b^9+36390912\,a^{21}\,b^8-5047296\,a^{22}\,b^7+1310720\,a^{23}\,b^6-983040\,a^{24}\,b^5+393216\,a^{25}\,b^4-65536\,a^{26}\,b^3\right )}{\left (2\,a^3-6\,a^2\,b+6\,a\,b^2-2\,b^3\right )\,\left (\frac {2\,\left (131072\,a^{30}\,b^2-1179648\,a^{29}\,b^3+4718592\,a^{28}\,b^4-12042240\,a^{27}\,b^5+27279360\,a^{26}\,b^6-67518464\,a^{25}\,b^7+155959296\,a^{24}\,b^8-279281664\,a^{23}\,b^9+365199360\,a^{22}\,b^{10}-344883200\,a^{21}\,b^{11}+233275392\,a^{20}\,b^{12}-110542848\,a^{19}\,b^{13}+34947072\,a^{18}\,b^{14}-6635520\,a^{17}\,b^{15}+573440\,a^{16}\,b^{16}\right )}{{\left (2\,a^3-6\,a^2\,b+6\,a\,b^2-2\,b^3\right )}^2}+1254400\,a^{12}\,b^{14}-10214400\,a^{13}\,b^{13}+35927040\,a^{14}\,b^{12}-70650880\,a^{15}\,b^{11}+83495936\,a^{16}\,b^{10}-58242048\,a^{17}\,b^9+20216832\,a^{18}\,b^8-17408\,a^{19}\,b^7-2285568\,a^{20}\,b^6+516096\,a^{21}\,b^5\right )}\right )}{f\,\left (2\,a^3-6\,a^2\,b+6\,a\,b^2-2\,b^3\right )}+\frac {\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (3\,a+7\,b\right )}{3\,a^2}-\frac {1}{3\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (8\,a^3\,b^2+8\,a^2\,b^3-55\,a\,b^4+35\,b^5\right )}{8\,a^4\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (48\,a^3\,b+40\,a^2\,b^2-275\,a\,b^3+175\,b^4\right )}{24\,a^3\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left (a^2\,{\mathrm {tan}\left (e+f\,x\right )}^3+2\,a\,b\,{\mathrm {tan}\left (e+f\,x\right )}^5+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^7\right )}-\frac {\mathrm {atan}\left (\frac {b^5\,\mathrm {tan}\left (e+f\,x\right )\,{\left (-a^9\,b^5\right )}^{3/2}\,1225{}\mathrm {i}-a\,b^4\,\mathrm {tan}\left (e+f\,x\right )\,{\left (-a^9\,b^5\right )}^{3/2}\,6300{}\mathrm {i}+a^4\,b\,\mathrm {tan}\left (e+f\,x\right )\,{\left (-a^9\,b^5\right )}^{3/2}\,3969{}\mathrm {i}+a^{18}\,b\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^9\,b^5}\,64{}\mathrm {i}+a^2\,b^3\,\mathrm {tan}\left (e+f\,x\right )\,{\left (-a^9\,b^5\right )}^{3/2}\,12510{}\mathrm {i}-a^3\,b^2\,\mathrm {tan}\left (e+f\,x\right )\,{\left (-a^9\,b^5\right )}^{3/2}\,11340{}\mathrm {i}}{-64\,a^{23}\,b^3+3969\,a^{18}\,b^8-11340\,a^{17}\,b^9+12510\,a^{16}\,b^{10}-6300\,a^{15}\,b^{11}+1225\,a^{14}\,b^{12}}\right )\,\sqrt {-a^9\,b^5}\,\left (63\,a^2-90\,a\,b+35\,b^2\right )\,1{}\mathrm {i}}{8\,f\,\left (-a^{12}+3\,a^{11}\,b-3\,a^{10}\,b^2+a^9\,b^3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^4/(a + b*tan(e + f*x)^2)^3,x)

[Out]

(2*atan((2*tan(e + f*x)*((262144*a^20*b^15 - 2883584*a^21*b^14 + 14155776*a^22*b^13 - 40370176*a^23*b^12 + 720
89600*a^24*b^11 - 77856768*a^25*b^10 + 34603008*a^26*b^9 + 34603008*a^27*b^8 - 77856768*a^28*b^7 + 72089600*a^
29*b^6 - 40370176*a^30*b^5 + 14155776*a^31*b^4 - 2883584*a^32*b^3 + 262144*a^33*b^2)/(6*a*b^2 - 6*a^2*b + 2*a^
3 - 2*b^3)^2 - 1254400*a^12*b^17 + 13977600*a^13*b^16 - 70333440*a^14*b^15 + 210329600*a^15*b^14 - 413730816*a
^16*b^13 + 559067136*a^17*b^12 - 525322240*a^18*b^11 + 338780160*a^19*b^10 - 143512576*a^20*b^9 + 36390912*a^2
1*b^8 - 5047296*a^22*b^7 + 1310720*a^23*b^6 - 983040*a^24*b^5 + 393216*a^25*b^4 - 65536*a^26*b^3))/((6*a*b^2 -
 6*a^2*b + 2*a^3 - 2*b^3)*((2*(573440*a^16*b^16 - 6635520*a^17*b^15 + 34947072*a^18*b^14 - 110542848*a^19*b^13
 + 233275392*a^20*b^12 - 344883200*a^21*b^11 + 365199360*a^22*b^10 - 279281664*a^23*b^9 + 155959296*a^24*b^8 -
 67518464*a^25*b^7 + 27279360*a^26*b^6 - 12042240*a^27*b^5 + 4718592*a^28*b^4 - 1179648*a^29*b^3 + 131072*a^30
*b^2))/(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3)^2 + 1254400*a^12*b^14 - 10214400*a^13*b^13 + 35927040*a^14*b^12 - 7
0650880*a^15*b^11 + 83495936*a^16*b^10 - 58242048*a^17*b^9 + 20216832*a^18*b^8 - 17408*a^19*b^7 - 2285568*a^20
*b^6 + 516096*a^21*b^5))))/(f*(6*a*b^2 - 6*a^2*b + 2*a^3 - 2*b^3)) + ((tan(e + f*x)^2*(3*a + 7*b))/(3*a^2) - 1
/(3*a) + (tan(e + f*x)^6*(35*b^5 - 55*a*b^4 + 8*a^2*b^3 + 8*a^3*b^2))/(8*a^4*(a^2 - 2*a*b + b^2)) + (tan(e + f
*x)^4*(48*a^3*b - 275*a*b^3 + 175*b^4 + 40*a^2*b^2))/(24*a^3*(a^2 - 2*a*b + b^2)))/(f*(a^2*tan(e + f*x)^3 + b^
2*tan(e + f*x)^7 + 2*a*b*tan(e + f*x)^5)) - (atan((b^5*tan(e + f*x)*(-a^9*b^5)^(3/2)*1225i - a*b^4*tan(e + f*x
)*(-a^9*b^5)^(3/2)*6300i + a^4*b*tan(e + f*x)*(-a^9*b^5)^(3/2)*3969i + a^18*b*tan(e + f*x)*(-a^9*b^5)^(1/2)*64
i + a^2*b^3*tan(e + f*x)*(-a^9*b^5)^(3/2)*12510i - a^3*b^2*tan(e + f*x)*(-a^9*b^5)^(3/2)*11340i)/(1225*a^14*b^
12 - 6300*a^15*b^11 + 12510*a^16*b^10 - 11340*a^17*b^9 + 3969*a^18*b^8 - 64*a^23*b^3))*(-a^9*b^5)^(1/2)*(63*a^
2 - 90*a*b + 35*b^2)*1i)/(8*f*(3*a^11*b - a^12 + a^9*b^3 - 3*a^10*b^2))

________________________________________________________________________________________